package permission;

class A {
    private void test() {
        System.out.println("A");
    }
}

class B extends A {
    private void test() {
        System.out.println("B");
    }
}

class C extends B {
    public void test() {
        System.out.println("C");
    }
}

public class ExtendsDemo {
    public static void main(String[] args) {
        C c = new C();
        c.test();

//        B b = c;
//        b.test();
//
//        A a = c;
//        a.test();
    }
}
